<div  ng-include="'partials/common/crumb/crumb.html'"></div>
<div id="home" ng-controller="homeCtrl" ng-init="init()">

	<div class="homeinfo">
		<div class="account">
			<span>{{'BALANCE' | translate}}</span>
			<i>{{ userService.balance | xasFilter }}</i>
			<b>XAS</b>
		</div>
		<div class="account">
			<span>{{'LATEST_BLOCK_HEIGHT' | translate}}</span><i ng-show="latestBlock.height">{{ latestBlock.height }}</i><i ng-show="!latestBlock.height">Loading...</i>
			<b ng-show="latestBlock.timestamp">{{latestBlock.timestamp | timestampFilter }}</b>
		</div>
		<div class="account">
			<span>{{'VERSION_INFO' | translate}}</span><i>{{ version.version }}</i>
			<b>{{version.build}} - {{version.net}}</b>
		</div>
	</div>
	<div class="latest">
		<div class="table_title">{{'MY_TRSACTIONS' | translate}}</div>
	</div>
	<div class="deal_table" >
		<table class="table"ng-table="hometableparams" border="0" width="100%" cellpadding="0" cellspacing="0"
			   template-pagination="custom/pager" >
			<thread>
					<tr>
						<td>ID</td>
						<td>{{'TYPE' | translate}}</td>
						<td>{{'SENDER' | translate}}</td>
						<td>{{'RECIPIENT' | translate}}</td>
						<td>{{'DATE' | translate}}</td>
						<td>{{'AMOUNTS' | translate}}({{'FEES' | translate}})</td>
						<td>{{'REMARK' | translate}}</td>
					</tr>
			</thread>
			<tr ng-repeat="i in $data"  >
				<td> {{i.id}}</td>
				<td>{{i.type | typeFilter}}</td>
				<td> <i class="level" ng-click="showaccountdetailInfo(i.senderId)">{{i.senderId}}</i></td>
				<td class="item_accept"> <i class="level" ng-click="showaccountdetailInfo(i.recipientId)">{{i.recipientId || 'SYSTEM' | translate}}</i></td>
				<td>{{i.timestamp | timestampFilter}}</td>
				<td>{{i.amount | xasFilter}}({{i.fee | xasFilter}})</td>
				<td>{{i.message}}</td>
			</tr>
		</table>
	</div>
	<script type="text/ng-template" id="custom/pager">
		<ul class="pagination ng-table-pagination">
			<li ng-class="{'disabled': !page.active && !page.current, 'active': page.current}" ng-repeat="page in pages" ng-switch="page.type">
				<a ng-switch-when="prev" ng-click="params.page(page.number)" href="">
					<i class="mdi-hardware-keyboard-arrow-left">{{'PREV_PAGE' | translate}}</i>
				</a>
				<a ng-switch-when="first" ng-click="params.page(page.number)" href="">
					<span ng-bind="page.number"></span>
				</a>
				<a ng-switch-when="page" ng-click="params.page(page.number)" href="">
					<span ng-bind="page.number"></span>
				</a>
				<a ng-switch-when="more" ng-click="params.page(page.number)" href="">&#8230;</a>
				<a ng-switch-when="last" ng-click="params.page(page.number)" href="">
					<span ng-bind="page.number"></span>
				</a>
				<a ng-switch-when="next" ng-click="params.page(page.number)" href="">
					<i class="mdi-hardware-keyboard-arrow-right">{{'NEXT_PAGE' | translate}}</i>
				</a>
			</li>
		</ul>
	</script>

</div>